/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package fr.insta.browser.domain;

import java.util.Date;
import javax.swing.ImageIcon;

/**
 * Représente une entré dans l'historique
 *
 * @author Maarek
 * @version $Id: $Id
 */
public class HistoryEntry implements IHistoryEntry {

    private ImageIcon icon;
    private String url;
    private String title;
    private Date date;

    /**
     * <p>Constructor for HistoryEntry.</p>
     *
     * @param url a {@link java.lang.String} object.
     * @param title a {@link java.lang.String} object.
     * @param icon a {@link javax.swing.ImageIcon} object.
     */
    public HistoryEntry(String url, String title, ImageIcon icon) {
    	this.icon = icon;
    	this.title = title;
    	this.url = url;
    	this.date = new Date();
    }
    
    /**
     * <p>Constructor for HistoryEntry.</p>
     *
     * @param url a {@link java.lang.String} object.
     * @param title a {@link java.lang.String} object.
     */
    public HistoryEntry(String url, String title) {
        this.url = url;
        this.title = title;
        this.date = new Date();
    }

    // <editor-fold defaultstate="collapsed" desc="Getter Setter">
    /** {@inheritDoc} */
    @Override
    public String getUrl() {
        return url;
    }

    /** {@inheritDoc} */
    @Override
    public void setUrl(String url) {
        this.url = url;
    }

    /** {@inheritDoc} */
    @Override
    public String getTitle() {
        return title;
    }

    /** {@inheritDoc} */
    @Override
    public void setTitle(String title) {
        this.title = title;
    }

    /** {@inheritDoc} */
    @Override
    public Date getDate() {
        return date;
    }

    /** {@inheritDoc} */
    @Override
    public void setDate(Date date) {
        this.date = date;
    }
    // </editor-fold>

    /** {@inheritDoc} */
    @Override
    public ImageIcon getIcon() {
        return icon;
    }

    /** {@inheritDoc} */
    @Override
    public void setIcon(ImageIcon icon) {
        this.icon = icon;
    }
}
